package org.tong.validate.req;

import lombok.Data;
import lombok.ToString;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author
 * @date 2022-08-11 16:35
 */
@Data
@ToString
public class StudentReq {

    @NotNull(message = "id不能为空")
    private Long id;

    @NotEmpty(message = "名字不能为空")
    private String name;

    @Valid
    @NotNull(message = "学生不能没有书")
    private BookReq book;
}
